<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<html lang="zh">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="initial-scale=1.0,user-scalable=no,maximum-scale=1" media="(device-height: 568px)">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="HandheldFriendly" content="True">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<title>SDC</title>
<link rel="stylesheet" type="text/css" media="all" href="css/reset.css" />
<link rel="stylesheet" type="text/css" media="all" href="css/style.css" />
<script type="text/javascript" src="js/jquery-2.1.1.min.js"></script>
<script src="js/canvas-particle.js" type="text/javascript"></script>
<script src="js/js.js" type="text/javascript"></script>
<script src="js/layui.all.js"></script>
</head>
<body>
	<!-- 背景div -->
	<div id="mydiv"></div>
	
	<!-- 头部 -->
	<div class="header">
		<h1 class="hetitle">矿机商城</h1>
		<a href="view/shopping_list.html" class="helr">记录</a>
	</div>
	
	<div id="page" class="page m3">
		<ul class="shopp_list">
			<!-- <li class="shopp_tiem">
				<div class="shopp_top">
					<img src="images/in_botpic1.png" alt="" class="shopp_img" />
					<p class="shopptop_title">
						型号：微型云矿机<br />
						寿命：4800小时<br />
						产量：0.0033/小时<br />
						总产量：10 
					</p>
				</div>
				<div class="shopp_bot">
					<p class="shoppbot_title">价格：0.0000 节点钱包</p>
					<a href="javascript:;" class="shoppbot_link">立即租用</a>
				</div>
			</li> -->
		</ul>
	</div>
	<!-- footer -->
	<div class="footer">
		<div class="fonav">
			<a href="index.html" class="foitem">
				<img src="images/foimg1.png" alt="" class="foimg" />首页
			</a>
			<a href="shopping.html" class="foitem on">
				<img src="images/foimg2_on.png" alt="" class="foimg" />矿机
			</a>
			<a href="transaction.html" class="foitem">
				<img src="images/foimg3.png" alt="" class="foimg" />交易
			</a>
			<a href="my.html" class="foitem">
				<img src="images/foimg4.png" alt="" class="foimg" />我的
			</a>
		</div>
	</div>
	<!--遮罩-->
<div class="mask"></div>
<!--租用弹窗-->
<div class="dialog" id="d1">
	<div class="dialog_content">
		<div class="dia_log">
			<h1 class="dia_title">租用微型云矿机<img src="images/close.png" onclick="closen()" alt="" class="dia_pic" /></h1>
			<p class="diashop_ti1">0.0000</p>
			<p class="diashop_ti2">节点钱包</p>
			<div class="pwd-box">
			    <input type="tel" maxlength="6" class="pwd-input" id="pwd-input">
			    <div class="fake-box">
			        <input type="password" readonly="">
			        <input type="password" readonly="">
			        <input type="password" readonly="">
			        <input type="password" readonly="">
			        <input type="password" readonly="">
			        <input type="password" readonly="">
			    </div>
			</div>

		</div>
	</div>
</div>
<script src="js/shopping.js"></script>
<script type="text/javascript">

// 密码弹出框
function passw(id,price){
	dialog("#d1");
	var id = id;
	$(".diashop_ti1").html(price.toFixed(4));
	//密码输入框
	var $input = $(".fake-box input");  
	$("#pwd-input").on("input", function() {  
		var pwd = $(this).val().trim();  
		for (var i = 0, len = pwd.length; i < len; i++) {  
			$input.eq("" + i + "").val(pwd[i]);  
		};
		$input.each(function() {  
			var index = $(this).index();  
			if (index >= len) {  
				$(this).val("");  
			};
		});  
		if (len == 6) {
			var pwd_input = $("#pwd-input").val()
			$.ajax({
				type:"post",
				url:url+'/profile/choicemine.html?token='+token,
				async:true,
				data:{'token':token,"car_id":id,"jymm":pwd_input},
				dataType:'json',
				success:function(result){
					// console.log(result)
					closen()
					if(result.status === "0001"){
						layer.msg(result.message)
						window.location.reload()
					}else{
						isErr(result)
					}
				}
			})
		}; 
	});
}
// 清除密码
function closen(){
	dialogClose()
	$("#pwd-input").val("");
	$(".fake-box input").val("")
}

</script>
</body>
</html>